#! /usr/bin/env ruby
require 'find'
require 'fileutils'

DIR = ARGV[0] || "."

count = 0
Find.find(DIR) do |path|
  if FileTest.directory?(path) and File.basename(path) == ".svn"
    FileUtils.rmtree path
    count += 1
  end
end

puts "Warrning: successfully delete #{count} .svn directories!"


